package com.atguigu.springcloud.service;

import com.atguigu.springcloud.entites.JsonResult;
import com.atguigu.springcloud.entites.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface IPaymentFeignService {

    @GetMapping("/payment/get/{id}")
    public JsonResult<Payment> queryPaymentById(@PathVariable("id") Long id);

    @GetMapping("/payment/feign/timeout")
    public String paymentFeignTimeout();    // 调用 模拟业务处理需要3秒(超时测试)

}
